home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / util / gnu / a2_0bEmacs_bin.lha / Emacs-19.25 / info / emacs-6 (.txt) < prev    next >
GNU Info File  |  1992-02-21  |  51KB  |  925 lines

  1. This is Info file ../info/emacs, produced by Makeinfo-1.43 from the
  2. input file emacs.tex.
  3.    This file documents the GNU Emacs editor.
  4.    Copyright (C) 1985, 1986, 1988 Richard M. Stallman.
  5.    Permission is granted to make and distribute verbatim copies of
  6. this manual provided the copyright notice and this permission notice
  7. are preserved on all copies.
  8.    Permission is granted to copy and distribute modified versions of
  9. this manual under the conditions for verbatim copying, provided also
  10. that the sections entitled "The GNU Manifesto", "Distribution" and "GNU
  11. General Public License" are included exactly as in the original, and
  12. provided that the entire resulting derived work is distributed under
  13. the terms of a permission notice identical to this one.
  14.    Permission is granted to copy and distribute translations of this
  15. manual into another language, under the above conditions for modified
  16. versions, except that the sections entitled "The GNU Manifesto",
  17. "Distribution" and "GNU General Public License" may be included in a
  18. translation approved by the author instead of in the original English.
  19. File: emacs,  Node: Windows,  Next: Major Modes,  Prev: Buffers,  Up: Top
  20. Multiple Windows
  21. ****************
  22.    Emacs can split the screen into two or many windows, which can
  23. display parts of different buffers, or different parts of one buffer.
  24. * Menu:
  25. * Basic Window::     Introduction to Emacs windows.
  26. * Split Window::     New windows are made by splitting existing windows.
  27. * Other Window::     Moving to another window or doing something to it.
  28. * Pop Up Window::    Finding a file or buffer in another window.
  29. * Change Window::    Deleting windows and changing their sizes.
  30. File: emacs,  Node: Basic Window,  Next: Split Window,  Prev: Windows,  Up: Windows
  31. Concepts of Emacs Windows
  32. =========================
  33.    When multiple windows are being displayed, each window has an Emacs
  34. buffer designated for display in it.  The same buffer may appear in
  35. more than one window; if it does, any changes in its text are
  36. displayed in all the windows where it appears.  But the windows
  37. showing the same buffer can show different parts of it, because each
  38. window has its own value of point.
  39.    At any time, one of the windows is the "selected window"; the buffer
  40. this window is displaying is the current buffer.  The terminal's cursor
  41. shows the location of point in this window.  Each other window has a
  42. location of point as well, but since the terminal has only one cursor
  43. there is no way to show where those locations are.
  44.    Commands to move point affect the value of point for the selected
  45. Emacs window only.  They do not change the value of point in any other
  46. Emacs window, even one showing the same buffer.  The same is true for
  47. commands such as `C-x b' to change the selected buffer in the selected
  48. window; they do not affect other windows at all.  However, there are
  49. other commands such as `C-x 4 b' that select a different window and
  50. switch buffers in it.  Also, all commands that display information in
  51. a window, including (for example) `C-h f' (`describe-function') and
  52. `C-x C-b' (`list-buffers'), work by switching buffers in a nonselected
  53. window without affecting the selected window.
  54.    Each window has its own mode line, which displays the buffer name,
  55. modification status and major and minor modes of the buffer that is
  56. displayed in the window.  *Note Mode Line::, for full details on the
  57. mode line.
  58. File: emacs,  Node: Split Window,  Next: Other Window,  Prev: Basic Window,  Up: Windows
  59. Splitting Windows
  60. =================
  61. `C-x 2'
  62.      Split the selected window into two windows, one above the other
  63.      (`split-window-vertically').
  64. `C-x 5'
  65.      Split the selected window into two windows positioned side by side
  66.      (`split-window-horizontally').
  67.    The command `C-x 2' (`split-window-vertically') breaks the selected
  68. window into two windows, one above the other.  Both windows start out
  69. displaying the same buffer, with the same value of point.  By default
  70. the two windows each get half the height of the window that was split;
  71. a numeric argument specifies how many lines to give to the top window.
  72.    `C-x 5' (`split-window-horizontally') breaks the selected window
  73. into two side-by-side windows.  A numeric argument specifies how many
  74. columns to give the one on the left.  A line of vertical bars
  75. separates the two windows.  Windows that are not the full width of the
  76. screen have mode lines, but they are truncated; also, they do not
  77. always appear in inverse video, because, the Emacs display routines
  78. have not been taught how to display a region of inverse video that is
  79. only part of a line on the screen.
  80.    When a window is less than the full width, text lines too long to
  81. fit are frequent.  Continuing all those lines might be confusing.  The
  82. variable `truncate-partial-width-windows' can be set non-`nil' to force
  83. truncation in all windows less than the full width of the screen,
  84. independent of the buffer being displayed and its value for
  85. `truncate-lines'.  *Note Continuation Lines::.
  86.    Horizontal scrolling is often used in side-by-side windows.  *Note
  87. Display::.
  88. File: emacs,  Node: Other Window,  Next: Pop Up Window,  Prev: Split Window,  Up: Windows
  89. Using Other Windows
  90. ===================
  91. `C-x o'
  92.      Select another window (`other-window').  That is `o', not zero.
  93. `C-M-v'
  94.      Scroll the next window (`scroll-other-window').
  95. `M-x compare-windows'
  96.      Find next place where the text in the selected window does not
  97.      match the text in the next window.
  98.    To select a different window, use `C-x o' (`other-window').  That
  99. is an `o', for `other', not a zero.  When there are more than two
  100. windows, this command moves through all the windows in a cyclic order,
  101. generally top to bottom and left to right.  From the rightmost and
  102. bottommost window, it goes back to the one at the upper left corner.  A
  103. numeric argument means to move several steps in the cyclic order of
  104. windows.  A negative argument moves around the cycle in the opposite
  105. order.  When the minibuffer is active, the minibuffer is the last
  106. window in the cycle; you can switch from the minibuffer window to one
  107. of the other windows, and later switch back and finish supplying the
  108. minibuffer argument that is requested.  *Note Minibuffer Edit::.
  109.    The usual scrolling commands (*note Display::.) apply to the
  110. selected window only, but there is one command to scroll the next
  111. window.  `C-M-v' (`scroll-other-window') scrolls the window that `C-x
  112. o' would select.  It takes arguments, positive and negative, like
  113. `C-v'.
  114.    The command `M-x compare-windows' compares the text in the current
  115. window with that in the next window.  Comparison starts at point in
  116. each window.  Point moves forward in each window, a character at a
  117. time in each window, until the next characters in the two windows are
  118. different.  Then the command is finished.
  119. File: emacs,  Node: Pop Up Window,  Next: Change Window,  Prev: Other Window,  Up: Windows
  120. Displaying in Another Window
  121. ============================
  122.    `C-x 4' is a prefix key for commands that select another window
  123. (splitting the window if there is only one) and select a buffer in that
  124. window.  Different `C-x 4' commands have different ways of finding the
  125. buffer to select.
  126. `C-x 4 b BUFNAME RET'
  127.      Select buffer BUFNAME in another window.  This runs 
  128.       `switch-to-buffer-other-window'.
  129. `C-x 4 f FILENAME RET'
  130.      Visit file FILENAME and select its buffer in another window.  This
  131.      runs `find-file-other-window'.  *Note Visiting::.
  132. `C-x 4 d DIRECTORY RET'
  133.      Select a Dired buffer for directory DIRECTORY in another window. 
  134.      This runs `dired-other-window'.  *Note Dired::.
  135. `C-x 4 m'
  136.      Start composing a mail message in another window.  This runs
  137.      `mail-other-window', and its same-window version is `C-x m'
  138.      (*note Sending Mail::.).
  139. `C-x 4 .'
  140.      Find a tag in the current tag table in another window.  This runs
  141.      `find-tag-other-window', the multiple-window variant of `M-.'
  142.      (*note Tags::.).
  143. File: emacs,  Node: Change Window,  Prev: Pop Up Window,  Up: Windows
  144. Deleting and Rearranging Windows
  145. ================================
  146. `C-x 0'
  147.      Get rid of the selected window (`kill-window').  That is a zero.
  148. `C-x 1'
  149.      Get rid of all windows except the selected one
  150.      (`delete-other-windows').
  151. `C-x ^'
  152.      Make the selected window taller, at the expense of the other(s)
  153.      (`enlarge-window').
  154. `C-x }'
  155.      Make the selected window wider (`enlarge-window-horizontally').
  156.    To delete a window, type `C-x 0' (`delete-window').  (That is a
  157. zero.)  The space occupied by the deleted window is distributed among
  158. the other active windows (but not the minibuffer window, even if that
  159. is active at the time).  Once a window is deleted, its attributes are
  160. forgotten; there is no automatic way to make another window of the
  161. same shape or showing the same buffer.  But the buffer continues to
  162. exist, and you can select it in any window with `C-x b'.
  163.    `C-x 1' (`delete-other-windows') is more powerful than `C-x 0'; it
  164. deletes all the windows except the selected one (and the minibuffer);
  165. the selected window expands to use the whole screen except for the echo
  166. area.
  167.    To readjust the division of space among existing windows, use `C-x
  168. ^' (`enlarge-window').  It makes the currently selected window get one
  169. line bigger, or as many lines as is specified with a numeric argument. 
  170. With a negative argument, it makes the selected window smaller.  `C-x
  171. }' (`enlarge-window-horizontally') makes the selected window wider by
  172. the specified number of columns.  The extra screen space given to a
  173. window comes from one of its neighbors, if that is possible;
  174. otherwise, all the competing windows are shrunk in the same
  175. proportion.  If this makes any windows too small, those windows are
  176. deleted and their space is divided up.  The minimum size is specified
  177. by the variables `window-min-height' and `window-min-width'.
  178. File: emacs,  Node: Major Modes,  Next: Indentation,  Prev: Windows,  Up: Top
  179. Major Modes
  180. ***********
  181.    Emacs has many different "major modes", each of which customizes
  182. Emacs for editing text of a particular sort.  The major modes are
  183. mutually exclusive, and each buffer has one major mode at any time. 
  184. The mode line normally contains the name of the current major mode, in
  185. parentheses.  *Note Mode Line::.
  186.    The least specialized major mode is called "Fundamental mode".  This
  187. mode has no mode-specific redefinitions or variable settings, so that
  188. each Emacs command behaves in its most general manner, and each option
  189. is in its default state.  For editing any specific type of text, such
  190. as Lisp code or English text, you should switch to the appropriate
  191. major mode, such as Lisp mode or Text mode.
  192.    Selecting a major mode changes the meanings of a few keys to become
  193. more specifically adapted to the language being edited.  The ones
  194. which are changed frequently are TAB, DEL, and LFD.  In addition, the
  195. commands which handle comments use the mode to determine how comments
  196. are to be delimited.  Many major modes redefine the syntactical
  197. properties of characters appearing in the buffer.  *Note Syntax::.
  198.    The major modes fall into three major groups.  Lisp mode (which has
  199. several variants), C mode and Muddle mode are for specific programming
  200. languages.  Text mode, Nroff mode, TeX mode and Outline mode are for
  201. editing English text.  The remaining major modes are not intended for
  202. use on users' files; they are used in buffers created for specific
  203. purposes by Emacs, such as Dired mode for buffers made by Dired (*note
  204. Dired::.), and Mail mode for buffers made by `C-x m' (*note Sending
  205. Mail::.), and Shell mode for buffers used for communicating with an
  206. inferior shell process (*note Interactive Shell::.).
  207.    Most programming language major modes specify that only blank lines
  208. separate paragraphs.  This is so that the paragraph commands remain
  209. useful.  *Note Paragraphs::.  They also cause Auto Fill mode to use
  210. the definition of TAB to indent the new lines it creates.  This is
  211. because most lines in a program are usually indented.  *Note
  212. Indentation::.
  213. * Menu:
  214. * Choosing Modes::     How major modes are specified or chosen.
  215. File: emacs,  Node: Choosing Modes,  Prev: Major Modes,  Up: Major Modes
  216. How Major Modes are Chosen
  217. ==========================
  218.    You can select a major mode explicitly for the current buffer, but
  219. most of the time Emacs determines which mode to use based on the file
  220. name or some text in the file.
  221.    Explicit selection of a new major mode is done with a `M-x' command. 
  222. From the name of a major mode, add `-mode' to get the name of a
  223. command to select that mode.  Thus, you can enter Lisp mode by
  224. executing `M-x lisp-mode'.
  225.    When you visit a file, Emacs usually chooses the right major mode
  226. based on the file's name.  For example, files whose names end in `.c'
  227. are edited in C mode.  The correspondence between file names and major
  228. mode is controlled by the variable `auto-mode-alist'.  Its value is a
  229. list in which each element has the form
  230.      (REGEXP . MODE-FUNCTION)
  231. For example, one element normally found in the list has the form
  232. `("\\.c$" . c-mode)', and it is responsible for selecting C mode for
  233. files whose names end in `.c'.  (Note that `\\' is needed in Lisp
  234. syntax to include a `\' in the string, which is needed to suppress the
  235. special meaning of `.' in regexps.)  The only practical way to change
  236. this variable is with Lisp code.
  237.    You can specify which major mode should be used for editing a
  238. certain file by a special sort of text in the first nonblank line of
  239. the file.  The mode name should appear in this line both preceded and
  240. followed by `-*-'.  Other text may appear on the line as well.  For
  241. example,
  242.      ;-*-Lisp-*-
  243. tells Emacs to use Lisp mode.  Note how the semicolon is used to make
  244. Lisp treat this line as a comment.  Such an explicit specification
  245. overrides any defaulting based on the file name.
  246.    Another format of mode specification is
  247.      -*-Mode: MODENAME;-*-
  248. which allows other things besides the major mode name to be specified. 
  249. However, Emacs does not look for anything except the mode name.
  250.    The major mode can also be specified in a local variables list. 
  251. *Note File Variables::.
  252.    When a file is visited that does not specify a major mode to use,
  253. or when a new buffer is created with `C-x b', the major mode used is
  254. that specified by the variable `default-major-mode'.  Normally this
  255. value is the symbol `fundamental-mode', which specifies Fundamental
  256. mode.  If `default-major-mode' is `nil', the major mode is taken from
  257. the previously selected buffer.
  258. File: emacs,  Node: Indentation,  Next: Text,  Prev: Major Modes,  Up: Top
  259. Indentation
  260. ***********
  261. `TAB'
  262.      Indent current line "appropriately" in a mode-dependent fashion.
  263. `LFD'
  264.      Perform RET followed by TAB (`newline-and-indent').
  265. `M-^'
  266.      Merge two lines (`delete-indentation').  This would cancel out
  267.      the effect of LFD.
  268. `C-M-o'
  269.      Split line at point; text on the line after point becomes a new
  270.      line indented to the same column that it now starts in
  271.      (`split-line').
  272. `M-m'
  273.      Move (forward or back) to the first nonblank character on the
  274.      current line (`back-to-indentation').
  275. `C-M-\'
  276.      Indent several lines to same column (`indent-region').
  277. `C-x TAB'
  278.      Shift block of lines rigidly right or left (`indent-rigidly').
  279. `M-i'
  280.      Indent from point to the next prespecified tab stop column
  281.      (`tab-to-tab-stop').
  282. `M-x indent-relative'
  283.      Indent from point to under an indentation point in the previous
  284.      line.
  285.    Most programming languages have some indentation convention.  For
  286. Lisp code, lines are indented according to their nesting in
  287. parentheses.  The same general idea is used for C code, though many
  288. details are different.
  289.    Whatever the language, to indent a line, use the TAB command.  Each
  290. major mode defines this command to perform the sort of indentation
  291. appropriate for the particular language.  In Lisp mode, TAB aligns the
  292. line according to its depth in parentheses.  No matter where in the
  293. line you are when you type TAB, it aligns the line as a whole.  In C
  294. mode, TAB implements a subtle and sophisticated indentation style that
  295. knows about many aspects of C syntax.
  296.    In Text mode, TAB runs the command `tab-to-tab-stop', which indents
  297. to the next tab stop column.  You can set the tab stops with `M-x
  298. edit-tab-stops'.
  299. * Menu:
  300. * Indentation Commands:: Various commands and techniques for indentation.
  301. * Tab Stops::            You can set arbitrary "tab stops" and then
  302.                          indent to the next tab stop when you want to.
  303. * Just Spaces::          You can request indentation using just spaces.
  304. File: emacs,  Node: Indentation Commands,  Next: Tab Stops,  Prev: Indentation,  Up: Indentation
  305. Indentation Commands and Techniques
  306. ===================================
  307.    If you just want to insert a tab character in the buffer, you can
  308. type `C-q TAB'.
  309.    To move over the indentation on a line, do `Meta-m'
  310. (`back-to-indentation').  This command, given anywhere on a line,
  311. positions point at the first nonblank character on the line.
  312.    To insert an indented line before the current line, do `C-a C-o
  313. TAB'.  To make an indented line after the current line, use `C-e LFD'.
  314.    `C-M-o' (`split-line') moves the text from point to the end of the
  315. line vertically down, so that the current line becomes two lines. 
  316. `C-M-o' first moves point forward over any spaces and tabs.  Then it
  317. inserts after point a newline and enough indentation to reach the same
  318. column point is on.  Point remains before the inserted newline; in this
  319. regard, `C-M-o' resembles `C-o'.
  320.    To join two lines cleanly, use the `Meta-^' (`delete-indentation')
  321. command to delete the indentation at the front of the current line,
  322. and the line boundary as well.  They are replaced by a single space,
  323. or by no space if at the beginning of a line or before a `)' or after
  324. a `('.  To delete just the indentation of a line, go to the beginning
  325. of the line and use `Meta-\' (`delete-horizontal-space'), which
  326. deletes all spaces and tabs around the cursor.
  327.    There are also commands for changing the indentation of several
  328. lines at once.  `Control-Meta-\' (`indent-region') gives each line
  329. which begins in the region the "usual" indentation by invoking TAB at
  330. the beginning of the line.  A numeric argument specifies the column to
  331. indent to, and each line is shifted left or right so that its first
  332. nonblank character appears in that column.  `C-x TAB'
  333. (`indent-rigidly') moves all of the lines in the region right by its
  334. argument (left, for negative arguments).  The whole group of lines
  335. moves rigidly sideways, which is how the command gets its name.
  336.    `M-x indent-relative' indents at point based on the previous line
  337. (actually, the last nonempty line.)  It inserts whitespace at point,
  338. moving point, until it is underneath an indentation point in the
  339. previous line.  An indentation point is the end of a sequence of
  340. whitespace or the end of the line.  If point is farther right than any
  341. indentation point in the previous line, the whitespace before point is
  342. deleted and the first indentation point then applicable is used.  If
  343. no indentation point is applicable even then, `tab-to-tab-stop' is run
  344. (see next section).
  345.    `indent-relative' is the definition of TAB in Indented Text mode. 
  346. *Note Text::.
  347. File: emacs,  Node: Tab Stops,  Next: Just Spaces,  Prev: Indentation Commands,  Up: Indentation
  348. Tab Stops
  349. =========
  350.    For typing in tables, you can use Text mode's definition of TAB,
  351. `tab-to-tab-stop'.  This command inserts indentation before point,
  352. enough to reach the next tab stop column.  If you are not in Text mode,
  353. this function can be found on `M-i' anyway.
  354.    The tab stops used by `M-i' can be set arbitrarily by the user. 
  355. They are stored in a variable called `tab-stop-list', as a list of
  356. column-numbers in increasing order.
  357.    The convenient way to set the tab stops is using `M-x
  358. edit-tab-stops', which creates and selects a buffer containing a
  359. description of the tab stop settings.  You can edit this buffer to
  360. specify different tab stops, and then type `C-c C-c' to make those new
  361. tab stops take effect.  In the tab stop buffer, `C-c C-c' runs the
  362. function `edit-tab-stops-note-changes' rather than its usual definition
  363. `save-buffer'.  `edit-tab-stops' records which buffer was current when
  364. you invoked it, and stores the tab stops back in that buffer; normally
  365. all buffers share the same tab stops and changing them in one buffer
  366. affects all, but if you happen to make `tab-stop-list' local in one
  367. buffer then `edit-tab-stops' in that buffer will edit the local
  368. settings.
  369.    Here is what the text representing the tab stops looks like for
  370. ordinary tab stops every eight columns.
  371.              :       :       :       :       :       :
  372.      0         1         2         3         4
  373.      0123456789012345678901234567890123456789012345678
  374.      To install changes, type C-c C-c
  375.    The first line contains a colon at each tab stop.  The remaining
  376. lines are present just to help you see where the colons are and know
  377. what to do.
  378.    Note that the tab stops that control `tab-to-tab-stop' have nothing
  379. to do with displaying tab characters in the buffer.  *Note Display
  380. Vars::, for more information on that.
  381. File: emacs,  Node: Just Spaces,  Prev: Tab Stops,  Up: Indentation
  382. Tabs vs. Spaces
  383. ===============
  384.    Emacs normally uses both tabs and spaces to indent lines.  If you
  385. prefer, all indentation can be made from spaces only.  To request
  386. this, set `indent-tabs-mode' to `nil'.  This is a per-buffer variable;
  387. altering the variable affects only the current buffer, but there is a
  388. default value which you can change as well.  *Note Locals::.
  389.    There are also commands to convert tabs to spaces or vice versa,
  390. always preserving the columns of all nonblank text.  `M-x tabify'
  391. scans the region for sequences of spaces, and converts sequences of at
  392. least three spaces to tabs if that can be done without changing
  393. indentation.  `M-x untabify' changes all tabs in the region to
  394. appropriate numbers of spaces.
  395. File: emacs,  Node: Text,  Next: Programs,  Prev: Indentation,  Up: Top
  396. Commands for Human Languages
  397. ****************************
  398.    The term "text" has two widespread meanings in our area of the
  399. computer field.  One is data that is a sequence of characters.  Any
  400. file that you edit with Emacs is text, in this sense of the word.  The
  401. other meaning is more restrictive: a sequence of characters in a human
  402. language for humans to read (possibly after processing by a text
  403. formatter), as opposed to a program or commands for a program.
  404.    Human languages have syntactic/stylistic conventions that can be
  405. supported or used to advantage by editor commands: conventions
  406. involving words, sentences, paragraphs, and capital letters.  This
  407. chapter describes Emacs commands for all of these things.  There are
  408. also commands for "filling", or rearranging paragraphs into lines of
  409. approximately equal length.  The commands for moving over and killing
  410. words, sentences and paragraphs, while intended primarily for editing
  411. text, are also often useful for editing programs.
  412.    Emacs has several major modes for editing human language text.  If
  413. the file contains text pure and simple, use Text mode, which customizes
  414. Emacs in small ways for the syntactic conventions of text.  For text
  415. which contains embedded commands for text formatters, Emacs has other
  416. major modes, each for a particular text formatter.  Thus, for input to
  417. TeX, you would use TeX mode; for input to nroff, Nroff mode.
  418. * Menu:
  419. * Text Mode::   The major modes for editing text files.
  420. * Nroff Mode::  The major mode for editing input to the formatter nroff.
  421. * TeX Mode::    The major modes for editing input to the formatter TeX.
  422. * Outline Mode::The major mode for editing outlines.
  423. * Words::       Moving over and killing words.
  424. * Sentences::   Moving over and killing sentences.
  425. * Paragraphs::    Moving over paragraphs.
  426. * Pages::    Moving over pages.
  427. * Filling::     Filling or justifying text
  428. * Case::        Changing the case of text
  429. File: emacs,  Node: Text Mode,  Next: Words,  Prev: Text,  Up: Text
  430. Text Mode
  431. =========
  432.    Editing files of text in a human language ought to be done using
  433. Text mode rather than Lisp or Fundamental mode.  Invoke `M-x
  434. text-mode' to enter Text mode.  In Text mode, TAB runs the function
  435. `tab-to-tab-stop', which allows you to use arbitrary tab stops set
  436. with `M-x edit-tab-stops' (*note Tab Stops::.).  Features concerned
  437. with comments in programs are turned off except when explicitly
  438. invoked.  The syntax table is changed so that periods are not
  439. considered part of a word, while apostrophes, backspaces and
  440. underlines are.
  441.    A similar variant mode is Indented Text mode, intended for editing
  442. text in which most lines are indented.  This mode defines TAB to run
  443. `indent-relative' (*note Indentation::.), and makes Auto Fill indent
  444. the lines it creates.  The result is that normally a line made by Auto
  445. Filling, or by LFD, is indented just like the previous line.  Use `M-x
  446. indented-text-mode' to select this mode.
  447.    Entering Text mode or Indented Text mode calls with no arguments the
  448. value of the variable `text-mode-hook', if that value exists and is
  449. not `nil'.  This value is also called when modes related to Text mode
  450. are entered; this includes Nroff mode, TeX mode, Outline mode and Mail
  451. mode.  Your hook can look at the value of `major-mode' to see which of
  452. these modes is actually being entered.
  453. * Menu:
  454.   Two modes similar to Text mode are of use for editing text that is to
  455. be passed through a text formatter before achieving the form in which
  456. humans are to read it.
  457. * Nroff Mode::  The major mode for editing input to the formatter nroff.
  458. * TeX Mode::    The major modes for editing input to the formatter TeX.
  459.   Another similar mode is used for editing outlines.  It allows you
  460. to view the text at various levels of detail.  You can view either
  461. the outline headings alone or both headings and text; you can also
  462. hide some of the headings at lower levels from view to make the high
  463. level structure more visible.
  464. * Outline Mode::The major mode for editing outlines.
  465. File: emacs,  Node: Nroff Mode,  Next: TeX Mode,  Prev: Text Mode,  Up: Text Mode
  466. Nroff Mode
  467. ----------
  468.    Nroff mode is a mode like Text mode but modified to handle nroff
  469. commands present in the text.  Invoke `M-x nroff-mode' to enter this
  470. mode.  It differs from Text mode in only a few ways.  All nroff
  471. command lines are considered paragraph separators, so that filling
  472. will never garble the nroff commands.  Pages are separated by `.bp'
  473. commands.  Comments start with backslash-doublequote.  Also, three
  474. special commands are provided that are not in Text mode:
  475. `M-n'
  476.      Move to the beginning of the next line that isn't an nroff command
  477.      (`forward-text-line').  An argument is a repeat count.
  478. `M-p'
  479.      Like `M-n' but move up (`backward-text-line').
  480. `M-?'
  481.      Prints in the echo area the number of text lines (lines that are
  482.      not nroff commands) in the region (`count-text-lines').
  483.    The other feature of Nroff mode is that you can turn on Electric
  484. Nroff newline mode.  This is a minor mode that you can turn on or off
  485. with `M-x electric-nroff-mode' (*note Minor Modes::.).  When the mode
  486. is on, each time you use RET to end a line that contains an nroff
  487. command that opens a kind of grouping, the matching nroff command to
  488. close that grouping is automatically inserted on the following line. 
  489. For example, if you are at the beginning of a line and type `. ( b
  490. RET', the matching command `.)b' will be inserted on a new line
  491. following point.
  492.    Entering Nroff mode calls with no arguments the value of the
  493. variable `text-mode-hook', if that value exists and is not `nil'; then
  494. it does the same with the variable `nroff-mode-hook'.
  495. File: emacs,  Node: TeX Mode,  Next: Outline Mode,  Prev: Nroff Mode,  Up: Text Mode
  496. TeX Mode
  497. --------
  498.    TeX is a powerful text formatter written by Donald Knuth; it is also
  499. free, like GNU Emacs.  LaTeX is a simplified input format for TeX,
  500. implemented by TeX macros.  It comes with TeX.
  501.    Emacs has a special TeX mode for editing TeX input files.  It
  502. provides facilities for checking the balance of delimiters and for
  503. invoking TeX on all or part of the file.
  504.    TeX mode has two variants, Plain TeX mode and LaTeX mode (actually
  505. two distinct major modes which differ only slightly).  They are
  506. designed for editing the two different input formats.  The command `M-x
  507. tex-mode' looks at the contents of the buffer to determine whether the
  508. contents appear to be LaTeX input or not; it then selects the
  509. appropriate mode.  If it can't tell which is right (e.g., the buffer is
  510. empty), the variable `TeX-default-mode' controls which mode is used.
  511.    The commands `M-x plain-tex-mode' and `M-x latex-mode' explicitly
  512. select the two variants of TeX mode.  Use these commands when `M-x
  513. tex-mode' does not guess right.
  514. * Menu:
  515. * Editing: TeX Editing.   Special commands for editing in TeX mode.
  516. * Printing: TeX Print.    Commands for printing part of a file with TeX.
  517.    TeX for Unix systems can be obtained from the University of
  518. Washington for a distribution fee.
  519.    To order a full distribution, send $140.00 for a 1/2 inch 9-track
  520. tape, $165.00 for two 4-track 1/4 inch cartridge tapes (foreign sites
  521. $150.00, for 1/2 inch, $175.00 for 1/4 inch, to cover the extra
  522. postage) payable to the University of Washington to:
  523.      The Director
  524.      Northwest Computer Support Group,  DW-10
  525.      University of Washington
  526.      Seattle, Washington 98195
  527. Purchase orders are acceptable, but there is an extra charge of
  528. $10.00, to pay for processing charges. (Total of $150 for domestic
  529. sites, $175 for foreign sites).
  530.    The normal distribution is a tar tape, blocked 20, 1600 bpi, on an
  531. industry standard 2400 foot half-inch reel.  The physical format for
  532. the 1/4 inch streamer cartridges uses QIC-11, 8000 bpi, 4-track
  533. serpentine recording for the SUN.  Also, SystemV tapes can be written
  534. in cpio format, blocked 5120 bytes, ASCII headers.
  535. File: emacs,  Node: TeX Editing,  Next: TeX Print,  Prev: TeX Mode,  Up: TeX Mode
  536. TeX Editing Commands
  537. ....................
  538.    Here are the special commands provided in TeX mode for editing the
  539. text of the file.
  540.      Insert, according to context, either ```' or `"' or `'''
  541.      (`TeX-insert-quote').
  542. `LFD'
  543.      Insert a paragraph break (two newlines) and check the previous
  544.      paragraph for unbalanced braces or dollar signs
  545.      (`TeX-terminate-paragraph').
  546. `M-x validate-TeX-buffer'
  547.      Check each paragraph in the buffer for unbalanced braces or
  548.      dollar signs.
  549. `M-{'
  550.      Insert `{}' and position point between them (`TeX-insert-braces').
  551. `M-}'
  552.      Move forward past the next unmatched close brace (`up-list').
  553. `C-c C-f'
  554.      Close a block for LaTeX (`TeX-close-LaTeX-block').
  555.    In TeX, the character `"' is not normally used; one uses ```' to
  556. start a quotation and `''' to end one.  TeX mode defines the key `"'
  557. to insert ```' after whitespace or an open brace, `"' after a
  558. backslash, or `''' otherwise.  This is done by the command
  559. `TeX-insert-quote'.  If you need the character `"' itself in unusual
  560. contexts, use `C-q' to insert it.  Also, `"' with a numeric argument
  561. always inserts that number of `"' characters.
  562.    In TeX mode, `$' has a special syntax code which attempts to
  563. understand the way TeX math mode delimiters match.  When you insert a
  564. `$' that is meant to exit math mode, the position of the matching `$'
  565. that entered math mode is displayed for a second.  This is the same
  566. feature that displays the open brace that matches a close brace that
  567. is inserted.  However, there is no way to tell whether a `$' enters
  568. math mode or leaves it; so when you insert a `$' that enters math
  569. mode, the previous `$' position is shown as if it were a match, even
  570. though they are actually unrelated.
  571.    If you prefer to keep braces balanced at all times, you can use
  572. `M-{' (`TeX-insert-braces') to insert a pair of braces.  It leaves
  573. point between the two braces so you can insert the text that belongs
  574. inside.  Afterward, use the command `M-}' (`up-list') to move forward
  575. past the close brace.
  576.    There are two commands for checking the matching of braces.  LFD
  577. (`TeX-terminate-paragraph') checks the paragraph before point, and
  578. inserts two newlines to start a new paragraph.  It prints a message in
  579. the echo area if any mismatch is found.  `M-x validate-TeX-buffer'
  580. checks the entire buffer, paragraph by paragraph.  When it finds a
  581. paragraph that contains a mismatch, it displays point at the beginning
  582. of the paragraph for a few seconds and pushes a mark at that spot. 
  583. Scanning continues until the whole buffer has been checked or until
  584. you type another key.  The positions of the last several paragraphs
  585. with mismatches can be found in the mark ring (*note Mark Ring::.).
  586.    Note that square brackets and parentheses are matched in TeX mode,
  587. not just braces.  This is wrong for the purpose of checking TeX syntax. 
  588. However, parentheses and square brackets are likely to be used in text
  589. as matching delimiters and it is useful for the various motion
  590. commands and automatic match display to work with them.
  591.    In LaTeX input, `\begin' and `\end' commands must balance.  After
  592. you insert a `\begin', use `C-c C-f' (`TeX-close-LaTeX-block') to
  593. insert automatically a matching `\end' (on a new line following the
  594. `\begin').  A blank line is inserted between the two, and point is
  595. left there.
  596. File: emacs,  Node: TeX Print,  Prev: TeX Editing,  Up: TeX Mode
  597. TeX Printing Commands
  598. .....................
  599.    You can invoke TeX as an inferior of Emacs on either the entire
  600. contents of the buffer or just a region at a time.  Running TeX in
  601. this way on just one chapter is a good way to see what your changes
  602. look like without taking the time to format the entire file.
  603. `C-c C-r'
  604.      Invoke TeX on the current region, plus the buffer's header
  605.      (`TeX-region').
  606. `C-c C-b'
  607.      Invoke TeX on the entire current buffer (`TeX-buffer').
  608. `C-c C-l'
  609.      Recenter the window showing output from the inferior TeX so that
  610.      the last line can be seen (`TeX-recenter-output-buffer').
  611. `C-c C-k'
  612.      Kill the inferior TeX (`TeX-kill-job').
  613. `C-c C-p'
  614.      Print the output from the last `C-c C-r' or `C-c C-b' command
  615.      (`TeX-print').
  616. `C-c C-q'
  617.      Show the printer queue (`TeX-show-print-queue').
  618.    You can pass the current buffer through an inferior TeX by means of
  619. `C-c C-b' (`TeX-buffer').  The formatted output appears in a file in
  620. `/tmp'; to print it, type `C-c C-p' (`TeX-print').  Afterward use `C-c
  621. C-q' (`TeX-show-print-queue') to view the progress of your output
  622. towards being printed.
  623.    The console output from TeX, including any error messages, appear
  624. in a buffer called `*TeX-shell*'.  If TeX gets an error, you can switch
  625. to this buffer and feed it input (this works as in Shell mode; *note
  626. Interactive Shell::.).  Without switching to this buffer you can scroll
  627. it so that its last line is visible by typing `C-c C-l'.
  628.    Type `C-c C-k' (`TeX-kill-job') to kill the TeX process if you see
  629. that its output is no longer useful.  Using `C-c C-b' or `C-c C-r'
  630. also kills any TeX process still running.
  631.    You can also pass an arbitrary region through an inferior TeX by
  632. typing `C-c C-r' (`TeX-region').  This is tricky, however, because
  633. most files of TeX input contain commands at the beginning to set
  634. parameters and define macros, without which no later part of the file
  635. will format correctly.  To solve this problem, `C-c C-r' allows you to
  636. designate a part of the file as containing essential commands; it is
  637. included before the specified region as part of the input to TeX.  The
  638. designated part of the file is called the "header".
  639.    To indicate the bounds of the header in Plain TeX mode, you insert
  640. two special strings in the file.  Insert `%**start of header' before
  641. the header, and `%**end of header' after it.  Each string must appear
  642. entirely on one line, but there may be other text on the line before or
  643. after.  The lines containing the two strings are included in the
  644. header.  If `%**start of header' does not appear within the first 100
  645. lines of the buffer, `C-c C-r' assumes that there is no header.
  646.    In LaTeX mode, the header begins with `\documentstyle' and ends
  647. with `\begin{document}'.  These are commands that LaTeX requires you
  648. to use in any case, so nothing special needs to be done to identify the
  649. header.
  650.    Entering either kind of TeX mode calls with no arguments the value
  651. of the variable `text-mode-hook', if that value exists and is not
  652. `nil'; then it does the same with the variable `TeX-mode-hook'. 
  653. Finally it does the same with either `plain-TeX-mode-hook' or
  654. `LaTeX-mode-hook'.
  655. File: emacs,  Node: Outline Mode,  Prev: TeX Mode,  Up: Text Mode
  656. Outline Mode
  657. ------------
  658.    Outline mode is a major mode much like Text mode but intended for
  659. editing outlines.  It allows you to make parts of the text temporarily
  660. invisible so that you can see just the overall structure of the
  661. outline.  Type `M-x outline-mode' to turn on Outline mode in the
  662. current buffer.
  663.    Entering Outline mode calls with no arguments the value of the
  664. variable `text-mode-hook', if that value exists and is not `nil'; then
  665. it does the same with the variable `outline-mode-hook'.
  666.    When a line is invisible in outline mode, it does not appear on the
  667. screen.  The screen appears exactly as if the invisible line were
  668. deleted, except that an ellipsis (three periods in a row) appears at
  669. the end of the previous visible line (only one ellipsis no matter how
  670. many invisible lines follow).
  671.    All editing commands treat the text of the invisible line as part
  672. of the previous visible line.  For example, `C-n' moves onto the next
  673. visible line.  Killing an entire visible line, including its
  674. terminating newline, really kills all the following invisible lines
  675. along with it; yanking it all back yanks the invisible lines and they
  676. remain invisible.
  677. * Menu:
  678. * Format: Outline Format.      What the text of an outline looks like.
  679. * Motion: Outline Motion.      Special commands for moving through outlines.
  680. * Visibility: Outline Visibility. Commands to control what is visible.
  681. File: emacs,  Node: Outline Format,  Next: Outline Motion,  Prev: Outline Mode,  Up: Outline Mode
  682. Format of Outlines
  683. ..................
  684.    Outline mode assumes that the lines in the buffer are of two types:
  685. "heading lines" and "body lines".  A heading line represents a topic
  686. in the outline.  Heading lines start with one or more stars; the
  687. number of stars determines the depth of the heading in the outline
  688. structure.  Thus, a heading line with one star is a major topic; all
  689. the heading lines with two stars between it and the next one-star
  690. heading are its subtopics; and so on.  Any line that is not a heading
  691. line is a body line.  Body lines belong to the preceding heading line.
  692.  Here is an example:
  693.      * Food
  694.      
  695.      This is the body,
  696.      which says something about the topic of food.
  697.      
  698.      ** Delicious Food
  699.      
  700.      This is the body of the second-level header.
  701.      
  702.      ** Distasteful Food
  703.      
  704.      This could have
  705.      a body too, with
  706.      several lines.
  707.      
  708.      *** Dormitory Food
  709.      
  710.      * Shelter
  711.      
  712.      A second first-level topic with its header line.
  713.    A heading line together with all following body lines is called
  714. collectively an "entry".  A heading line together with all following
  715. deeper heading lines and their body lines is called a "subtree".
  716.    You can customize the criterion for distinguishing heading lines by
  717. setting the variable `outline-regexp'.  Any line whose beginning has a
  718. match for this regexp is considered a heading line.  Matches that
  719. start within a line (not at the beginning) do not count.  The length
  720. of the matching text determines the level of the heading; longer
  721. matches make a more deeply nested level.  Thus, for example, if a text
  722. formatter has commands `@chapter', `@section' and `@subsection' to
  723. divide the document into chapters and sections, you could make those
  724. lines count as heading lines by setting `outline-regexp' to
  725. `"@chap\\|@\\(sub\\)*section"'.  Note the trick: the two words
  726. `chapter' and `section' are equally long, but by defining the regexp
  727. to match only `chap' we ensure that the length of the text matched on
  728. a chapter heading is shorter, so that Outline mode will know that
  729. sections are contained in chapters.  This works as long as no other
  730. command starts with `@chap'.
  731.    Outline mode makes a line invisible by changing the newline before
  732. it into an ASCII Control-M (code 015).  Most editing commands that
  733. work on lines treat an invisible line as part of the previous line
  734. because, strictly speaking, it is part of that line, since there is no
  735. longer a newline in between.  When you save the file in Outline mode,
  736. Control-M characters are saved as newlines, so the invisible lines
  737. become ordinary lines in the file.  But saving does not change the
  738. visibility status of a line inside Emacs.
  739. File: emacs,  Node: Outline Motion,  Next: Outline Visibility,  Prev: Outline Format,  Up: Outline Mode
  740. Outline Motion Commands
  741. .......................
  742.    There are some special motion commands in Outline mode that move
  743. backward and forward to heading lines.
  744. `C-c C-n'
  745.      Move point to the next visible heading line
  746.      (`outline-next-visible-heading').
  747. `C-c C-p'
  748.      Move point to the previous visible heading line 
  749.       (`outline-previous-visible-heading').
  750. `C-c C-f'
  751.      Move point to the next visible heading line at the same level as
  752.      the one point is on (`outline-forward-same-level').
  753. `C-c C-b'
  754.      Move point to the previous visible heading line at the same level
  755.      (`outline-backward-same-level').
  756. `C-c C-u'
  757.      Move point up to a lower-level (more inclusive) visible heading
  758.      line (`outline-up-heading').
  759.    `C-c C-n' (`next-visible-heading') moves down to the next heading
  760. line.  `C-c C-p' (`previous-visible-heading') moves similarly
  761. backward.  Both accept numeric arguments as repeat counts.  The names
  762. emphasize that invisible headings are skipped, but this is not really
  763. a special feature.  All editing commands that look for lines ignore the
  764. invisible lines automatically.
  765.    More advanced motion commands understand the levels of headings. 
  766. The commands `C-c C-f' (`outline-forward-same-level') and `C-c C-b'
  767. (`outline-backward-same-level') move from one heading line to another
  768. visible heading at the same depth in the outline.  `C-c C-u'
  769. (`outline-up-heading') moves backward to another heading that is less
  770. deeply nested.
  771. File: emacs,  Node: Outline Visibility,  Prev: Outline Motion,  Up: Outline Mode
  772. Outline Visibility Commands
  773. ...........................
  774.    The other special commands of outline mode are used to make lines
  775. visible or invisible.  Their names all start with `hide' or `show'. 
  776. Most of them fall into pairs of opposites.  They are not undoable;
  777. instead, you can undo right past them.  Making lines visible or
  778. invisible is simply not recorded by the undo mechanism.
  779. `M-x hide-body'
  780.      Make all body lines in the buffer invisible.
  781. `M-x show-all'
  782.      Make all lines in the buffer visible.
  783. `C-c C-h'
  784.      Make everything under this heading invisible, not including this
  785.      heading itself
  786.       (`hide-subtree').
  787. `C-c C-s'
  788.      Make everything under this heading visible, including body,
  789.      subheadings, and their bodies (`show-subtree').
  790. `M-x hide-leaves'
  791.      Make the body of this heading line, and of all its subheadings,
  792.      invisible.
  793. `M-x show-branches'
  794.      Make all subheadings of this heading line, at all levels, visible.
  795. `C-c C-i'
  796.      Make immediate subheadings (one level down) of this heading line
  797.      visible (`show-children').
  798. `M-x hide-entry'
  799.      Make this heading line's body invisible.
  800. `M-x show-entry'
  801.      Make this heading line's body visible.
  802.    Two commands that are exact opposites are `M-x hide-entry' and `M-x
  803. show-entry'.  They are used with point on a heading line, and apply
  804. only to the body lines of that heading.  The subtopics and their
  805. bodies are not affected.
  806.    Two more powerful opposites are `C-c C-h' (`hide-subtree') and `C-c
  807. C-s' (`show-subtree').  Both expect to be used when point is on a
  808. heading line, and both apply to all the lines of that heading's
  809. "subtree": its body, all its subheadings, both direct and indirect, and
  810. all of their bodies.  In other words, the subtree contains everything
  811. following this heading line, up to and not including the next heading
  812. of the same or higher rank.
  813.    Intermediate between a visible subtree and an invisible one is
  814. having all the subheadings visible but none of the body.  There are
  815. two commands for doing this, depending on whether you want to hide the
  816. bodies or make the subheadings visible.  They are `M-x hide-leaves' and
  817. `M-x show-branches'.
  818.    A little weaker than `show-branches' is `C-c C-i'
  819. (`show-children').  It makes just the direct subheadings
  820. visible--those one level down.  Deeper subheadings remain invisible, if
  821. they were invisible.
  822.    Two commands have a blanket effect on the whole file.  `M-x
  823. hide-body' makes all body lines invisible, so that you see just the
  824. outline structure.  `M-x show-all' makes all lines visible.  These
  825. commands can be thought of as a pair of opposites even though `M-x
  826. show-all' applies to more than just body lines.
  827.    The use of ellipses at the ends of visible lines can be turned off
  828. by setting `selective-display-ellipses' to `nil'.  Then there is no
  829. visible indication of the presence of invisible lines.
  830. File: emacs,  Node: Words,  Next: Sentences,  Prev: Text Mode,  Up: Text
  831. Words
  832. =====
  833.    Emacs has commands for moving over or operating on words.  By
  834. convention, the keys for them are all `Meta-' characters.
  835. `M-f'
  836.      Move forward over a word (`forward-word').
  837. `M-b'
  838.      Move backward over a word (`backward-word').
  839. `M-d'
  840.      Kill up to the end of a word (`kill-word').
  841. `M-DEL'
  842.      Kill back to the beginning of a word (`backward-kill-word').
  843. `M-@'
  844.      Mark the end of the next word (`mark-word').
  845. `M-t'
  846.      Transpose two words;  drag a word forward or backward across
  847.      other words (`transpose-words').
  848.    Notice how these keys form a series that parallels the
  849. character-based `C-f', `C-b', `C-d', `C-t' and DEL.  `M-@' is related
  850. to `C-@', which is an alias for `C-SPC'.
  851.    The commands `Meta-f' (`forward-word') and `Meta-b'
  852. (`backward-word') move forward and backward over words.  They are thus
  853. analogous to `Control-f' and `Control-b', which move over single
  854. characters.  Like their `Control-' analogues, `Meta-f' and `Meta-b'
  855. move several words if given an argument.  `Meta-f' with a negative
  856. argument moves backward, and `Meta-b' with a negative argument moves
  857. forward.  Forward motion stops right after the last letter of the
  858. word, while backward motion stops right before the first letter.
  859.    `Meta-d' (`kill-word') kills the word after point.  To be precise,
  860. it kills everything from point to the place `Meta-f' would move to. 
  861. Thus, if point is in the middle of a word, `Meta-d' kills just the
  862. part after point.  If some punctuation comes between point and the
  863. next word, it is killed along with the word.  (If you wish to kill
  864. only the next word but not the punctuation before it, simply do
  865. `Meta-f' to get the end, and kill the word backwards with `Meta-DEL'.)
  866. `Meta-d' takes arguments just like `Meta-f'.
  867.    `Meta-DEL' (`backward-kill-word') kills the word before point.  It
  868. kills everything from point back to where `Meta-b' would move to.  If
  869. point is after the space in `FOO, BAR', then `FOO, ' is killed.  (If
  870. you wish to kill just `FOO', do `Meta-b Meta-d' instead of `Meta-DEL'.)
  871.    `Meta-t' (`transpose-words') exchanges the word before or
  872. containing point with the following word.  The delimiter characters
  873. between the words do not move.  For example, `FOO, BAR' transposes into
  874. `BAR, FOO' rather than `BAR FOO,'.  *Note Transpose::, for more on
  875. transposition and on arguments to transposition commands.
  876.    To operate on the next N words with an operation which applies
  877. between point and mark, you can either set the mark at point and then
  878. move over the words, or you can use the command `Meta-@' (`mark-word')
  879. which does not move point, but sets the mark where `Meta-f' would move
  880. to.  It can be given arguments just like `Meta-f'.
  881.    The word commands' understanding of syntax is completely controlled
  882. by the syntax table.  Any character can, for example, be declared to
  883. be a word delimiter.  *Note Syntax::.
  884. File: emacs,  Node: Sentences,  Next: Paragraphs,  Prev: Words,  Up: Text
  885. Sentences
  886. =========
  887.    The Emacs commands for manipulating sentences and paragraphs are
  888. mostly on `Meta-' keys, so as to be like the word-handling commands.
  889. `M-a'
  890.      Move back to the beginning of the sentence (`backward-sentence').
  891. `M-e'
  892.      Move forward to the end of the sentence (`forward-sentence').
  893. `M-k'
  894.      Kill forward to the end of the sentence (`kill-sentence').
  895. `C-x DEL'
  896.      Kill back to the beginning of the sentence 
  897.      (`backward-kill-sentence').
  898.    The commands `Meta-a' and `Meta-e' (`backward-sentence' and
  899. `forward-sentence') move to the beginning and end of the current
  900. sentence, respectively.  They were chosen to resemble `Control-a' and
  901. `Control-e', which move to the beginning and end of a line.  Unlike
  902. them, `Meta-a' and `Meta-e' if repeated or given numeric arguments
  903. move over successive sentences.  Emacs assumes that the typist's
  904. convention is followed, and thus considers a sentence to end wherever
  905. there is a `.', `?' or `!' followed by the end of a line or two spaces,
  906. with any number of `)', `]', `'', or `"' characters allowed in
  907. between.  A sentence also begins or ends wherever a paragraph begins
  908. or ends.
  909.    Neither `M-a' nor `M-e' moves past the newline or spaces beyond the
  910. sentence edge at which it is stopping.
  911.    Just as `C-a' and `C-e' have a kill command, `C-k', to go with
  912. them, so `M-a' and `M-e' have a corresponding kill command `M-k'
  913. (`kill-sentence') which kills from point to the end of the sentence. 
  914. With minus one as an argument it kills back to the beginning of the
  915. sentence.  Larger arguments serve as a repeat count.
  916.    There is a special command, `C-x DEL' (`backward-kill-sentence')
  917. for killing back to the beginning of a sentence, because this is
  918. useful when you change your mind in the middle of composing text.
  919.    The variable `sentence-end' controls recognition of the end of a
  920. sentence.  It is a regexp that matches the last few characters of a
  921. sentence, together with the whitespace following the sentence.  Its
  922. normal value is
  923.      "[.?!][]\"')]*\\($\\|\t\\|  \\)[ \t\n]*"
  924. This example is explained in the section on regexps.  *Note Regexps::.
  925.